from django.db import models

from apps.client.models import Client
from apps.core.models import GenericModel
from apps.users.models import Provider


# Create your models here.


class ClientStripeAccount(GenericModel):
    client = models.OneToOneField(Client,
                                    on_delete=models.CASCADE,
                                    related_name='stripe_account',
                                    primary_key=True)
    stripe_id = models.CharField(max_length=255)
    auto_pay = models.BooleanField(default=False)
    auto_pay_card_id = models.CharField(max_length=255, null=True)

    class Meta:
        db_table = 'client_stripe_accounts'

